          
          
         
            //var originalWidth = consultWidth = window.innerWidth;
            //var linkJumpCount = 16;
            var linkHref;
            var beginningDelay = 0;
            var animateDelayCount = 1300;
            var watchBrowse = null;

            //first ele add class
            function fstAddClass(){
                for(var c = 0;c < $('.addFst').length;c++){
                    $('.addFst:eq(' + c + ')>*:first-child').addClass('active');
                }
            }
            
            function countDown(){
                    linkJumpCount -= 1;
                
                    //linkJumpCount=0时，跳转页面
                    if(linkJumpCount <= 0){
                        location.href = linkHref;
                    }

                    //每秒执行一次,showTime()
                    setTimeout("countDown()",100);
            }
            //内容高度是否小于屏幕高度
            function checkContnHeight(){
                if($('.container')[0].offsetHeight < window.innerHeight){
                    $('.container').addClass('fillAll');
                }
            }
            //禁止滚动
            function onMouseScroll(e) {
                    event.preventDefault();
                    var wheel = e.originalEvent.wheelDelta || -e.originalEvent.detail;
                    var delta = Math.max(-1, Math.min(1, wheel) );
                    if(delta < 0){//向下滚动
                        scrollDown = true;
                    }else{//向上滚动
                        scrollDown = false;
                    }
            }
            
            //前进后退页面处于顶部
            function beginningAtTop(){
                setTimeout(function(){
                    document.documentElement.scrollTop = document.body.scrollTop = 0;
                },10)
            }

            //返回顶部
            var toTop = null;
            function windowToTop(){
                clearInterval(toTop);
                toTop = setInterval(function(){
                    var current = document.documentElement.scrollTop || document.body.scrollTop;
                    var val = Math.ceil(current / 10);
                    var newScroll = current - val;
                    if(newScroll <= 0){
                        document.documentElement.scrollTop = document.body.scrollTop = 0;
                        clearInterval(toTop);
                        toTop = null
                    }else{
                        document.documentElement.scrollTop = document.body.scrollTop = newScroll;
                    }
                    
                    
                },10);
                
            }

            //滑动至指定部分
            var scrollInt = null;
            function scrollSec(val){
                scrollInt = setInterval(function(){
                    var now = document.documentElement.scrollTop || document.body.scrollTop;
                    now = parseInt(now);
                    if(now > val){
                        var v = Math.ceil((now - val) / 15);
                        now -= v;
                    }else if(now < val){
                        var v = Math.ceil((val - now) / 15);
                        now += v;
                    }
                    document.documentElement.scrollTop = document.body.scrollTop = now;
                   
                    if(now == val){
                        clearInterval(scrollInt);
                    }
                },10)
            }


            //判断是否为移动设备
            function browserRedirect(){
                var sUserAgent = navigator.userAgent.toLowerCase();
                var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
                var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
                var bIsMidp = sUserAgent.match(/midp/i) == "midp";
                var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
                var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
                var bIsAndroid = sUserAgent.match(/android/i) == "android";
                var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
                var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
                if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
                    $('body').addClass('mobileDevice');
                    return true;
                }else{
                    return false;
                }
            }

           
            $(document).ready(function(){
                    browserRedirect(); 
                    fstAddClass();
                    setTimeout(checkContnHeight,10);
                    $('footer .toTop').click(function(){
                        windowToTop();
                    })
             
                    $('.language').click(function(){
                        if($(this)[0].className.indexOf('clicked') < 0){
                            $(this).addClass('clicked');
                            $(this).find('.mid').height($(this).find('.inner')[0].offsetHeight);
                        }else{
                            $(this).removeClass('clicked');
                            $(this).find('.mid')[0].style.height = '';
                        }
                    })

                    $('header .menuBtn').click(function(){
                        if($('header')[0].className.indexOf('active') >= 0){
                            $('header').removeClass('active');
                        }else{
                            $('header').addClass('active');
                        }
                        
                    })

                    $('header nav .close').click(function(){
                        $('header .menuBtn')[0].click();
                    })

                    watchBrowse = setInterval(function(){
                        var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
                        if(!$('footer .toTop')[0]) return false;
                        if(scrollTop > 300 && $('footer .toTop')[0].className.indexOf('active') < 0){
                            $('footer .toTop').addClass('active');
                        }else if(scrollTop <= 300 && $('footer .toTop')[0].className.indexOf('active') >= 0){
                            $('footer .toTop').removeClass('active');
                        }
                    },10)

                    

                    $('main .showVideo').click(function(){
                        $('main .videoBox').removeClass('hidden');
                        $('main .videoBox video')[0].play();
                    })
                    $('main .videoBox .video .close').click(function(){
                        $('main .videoBox video')[0].pause();
                        $('main .videoBox video')[0].currentTime = 0;
                        $(this).parents('.videoBox').addClass('hidden');

                    })

                    var nowHref = window.location.href;
                    var pageLinks = [];
                    for(var c = 0;c < $('main .pageNav a').length;c++){
                        var obj = {};
                        obj.url = $('main .pageNav a').eq(c).attr('href');
                        obj.name = $('main .pageNav a').eq(c).text();
                        for(var f = 0;f < $('header nav a').length;f++){
                            if(obj.url == $('header nav a').eq(f).attr('href')){
                                $('header nav a').eq(f).addClass('active');
                                break;
                            }
                        }
                        if(nowHref.indexOf($('main .pageNav a').eq(c).attr('href')) >= 0 && !$('main .pageNav .active').length){
                            $('main .pageNav a').eq(c).addClass('active');
                            continue;
                        }
                        pageLinks.push(obj);
                    }
                    for(var a = 0;a < pageLinks.length;a++){
                        $('main .aboutPage .fluid a').eq(a).attr('href',pageLinks[a].url);
                        $('main .aboutPage .fluid a').eq(a).find('span').text(pageLinks[a].name);
                    }
            })
            

            
            

        